package com.cn.wanxi.servlet;

import com.cn.wanxi.service.ICommonService;
import com.cn.wanxi.service.impl.CommonServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/company")
public class CompanyServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        CommonIO commonIO=new CommonIO();
//        req.setAttribute("commonModelDto",commonIO.getFromCommon());

//        req.setAttribute("lunboImgs", companyModel.lunboImgs);
        ICommonService iCommonService=new CommonServiceImpl();
        req.setAttribute("commonModelDto",iCommonService.getCommonModelDto());


        req.getRequestDispatcher("/jsp/company.jsp").forward(req, resp);//将值转发到页面去
    }
}
